{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from ggplot import *\n",
    "\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>w</th>\n",
       "      <th>x</th>\n",
       "      <th>y</th>\n",
       "      <th>z</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   w   x  y  z\n",
       "0  4   2  1  1\n",
       "1  2   5  1  1\n",
       "2  2   7  1  2\n",
       "3  2   9  1  2\n",
       "4  4  12  1  3"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame([{\"x\":2,\"y\":1,\"z\":\"1\",\"w\":4},{\"x\":5,\"y\":1,\"z\":\"1\",\"w\":2},{\"x\":7,\"y\":1,\"z\":\"2\",\"w\":2},{\"x\":9,\"y\":1,\"z\":\"2\",\"w\":2},{\"x\":12,\"y\":1,\"z\":\"3\",\"w\":4},{\"x\":2,\"y\":2,\"z\":\"3\",\"w\":4},{\"x\":5,\"y\":2,\"z\":\"4\",\"w\":2},{\"x\":7,\"y\":2,\"z\":\"4\",\"w\":2},{\"x\":9,\"y\":2,\"z\":\"5\",\"w\":2},{\"x\":12,\"y\":2,\"z\":\"5\",\"w\":4}])\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAApgAAAH/CAYAAADzKK22AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHhxJREFUeJzt3X+Q1fV97/HX7rILwu4qyo+uUElLZdEwRQG39tZWiVJl\n0KKNGIdabbwjMbkdo9OYfzI1dpybNBOaaKcdE1qT0dZi0SnBCGn0ZiKKxkhJtPEadDVFfsmYhg27\ni7Di7t4/HPZms+guyweWYx6PGWd2z/l+z773o8JzPuec76nq7e3tDQAAFFI90gMAAPD+IjABAChK\nYAIAUJTABACgKIEJAEBRAhMAgKJGDXbA22+/na9//evp7u5OT09PzjzzzFxwwQUDjlu3bl1eeeWV\n1NbW5vLLL09TU9PRmBcAgONc1VCug/nWW2+lrq4uPT09ueeee7Jw4cJMnTq17/7W1tY8++yz+ZM/\n+ZNs37493/rWt3LDDTcc1cEBADg+Dekp8rq6uiTv7Gb29PSkqqqq3/2bN2/O7NmzkyRTp05NV1dX\nOjs7C48KAEAlGPQp8iTp6enJihUrsnv37rS0tGTKlCn97u/o6EhjY2Pf9w0NDWlvb099fX3a29sH\nxGZ9fX2/4wEAeP8YUmBWV1fnxhtvzP79+/PAAw/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plain": [
       "<matplotlib.figure.Figure at 0x105014e50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<ggplot: (273683505)>\n"
     ]
    }
   ],
   "source": [
    "p = ggplot(df, aes(xmin='x - w / 2', xmax='x + w / 2', ymin='y', ymax='y + 1', fill='z')) + geom_rect()\n",
    "print p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAApgAAAH/CAYAAADzKK22AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHgZJREFUeJzt3X2Q1uV97/HP7rILwu4qykNXqKSlsmiYorBSc2pHqVLl\noEUbMZZabTKjMZ6O0WnMP50xMs6kzYSm2kmrodUcbR0sOiUYIY1OG4n4EAlRG49BV1PkQTmmQrh3\nEVbc3fOH455sFt0FLlhu+3rNOLN737/fvd+9fODtdT/8anp7e3sDAACF1A73AAAAfLQITAAAihKY\nAAAUJTABAChKYAIAUJTABACgqBGDHfDuu+/mm9/8Zrq7u9PT05NTTz0155xzzoDj1qxZk1deeSX1\n9fW5+OKL09LScjjmBQDgKFczlM/BfOedd9LQ0JCenp7cddddmT9/fiZPntx3f3t7e5555pn80R/9\nUbZu3ZrvfOc7ufrqqw/r4AAAHJ2G9BR5Q0NDkvd2M3t6elJTU9Pv/o0bN2bmzJlJksmTJ6erqyud\nnZ2FRwUAoBoM+hR5kvT09GTZsmXZsWNH5syZk0mTJvW7v6OjI83NzX3fNzU1pVKppLGxMZVKZUBs\nNjY29jseAICPjiEFZm1tba699trs3bs3999/f958881MmDBhSD9gw4YNWbt2bb/bvn7nHXnr/755\n4NPCIRox8pi827VnuMeoStbu4B1TPzp79r093GNUJWvHcHEl7UMzpMB836hRo/Jrv/ZreeWVV/oF\n5vs7lu+rVCp9O5SzZ89Oa2trv8dZsmRJ2lZ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OZM2dOxo4dm9/6rd/KU0891Xff\n3Llzc/PNN+ess85Kc3NzLrjgguzYsaPv/qeffjq//du/nbFjx+b000/P2rVrj8jvA3CkCEyAD9DW\n1pZzzjknX/3qV/vdvnPnzlx44YW54YYb8tZbb+XGG2/MggULsnPnzr5jli9fnnvuuSc/+9nP0tXV\nlaVLlyZJtm3blgsvvDA333xzdu7cmaVLl+aTn/xk3nrrrSP6uwEcTgIT4EMsWbIkX//61/sF4OrV\nqzNt2rQsXrw4tbW1ufzyyzN9+vR8+9vf7jvm05/+dKZOnZqRI0fmsssuy3PPPZckue+++7JgwYKc\nf/75SZJzzz03bW1tWbNmzZH9xQAOI4EJ8CE+/vGP58ILL8xf/MVfJEl6e3vz+uuvZ8qUKf2OmzJl\nSrZt29b3/a/8yq/0fT169Oh0dnYmSV577bWsWLEixx9/fI4//viMHTs2TzzxRN54440j8NsAHBkC\nE2AQt9xyS/7+7/8+27ZtS01NTSZNmpRNmzb1O2bz5s2ZNGnSoI/1q7/6q7nyyiuzY8eO7NixIzt3\n7kxHR0e++MUvHqbpAY48gQkwiKlTp+ZTn/pU/uZv/iZJMn/+/LS3t+f+++9Pd3d3/vmf/zk/+clP\nctFFFw36WFdccUW+/e1v55FHHklPT0/27t2btWvX5vXXXz/cvwbAESMwAfbjlz+O6Oabb87bb7+d\nmpqaHH/88Xn44YezdOnSjBs3LkuXLs3q1aszduzY/Z77iyZPnpxVq1bly1/+csaPH58pU6Zk6dKl\n6enpOay/D8CRVNPb29s73EMAAPDRYQcTAICiBCYAAEUJTAAAihKYAAAUJTABAChKYAIAUJTABACg\nKIEJAEBR/w/EZrJz6eWjtgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1112b03d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<ggplot: (286440725)>\n"
     ]
    }
   ],
   "source": [
    "p = ggplot(df, aes(xmin='x - w / 2', xmax='x + w / 2', ymin='y', ymax='y + 1', fill='z')) + geom_rect(color='black')\n",
    "print(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAApgAAAIICAYAAADKV56KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2QnXV9N/7P2T1nH5LdYxbz4Jo00UayAWMTs+tKW9oQ\nkELugAlK0CLFW6co5dfJSCv+YTsCY8fWEalxehdMi944Okkj0zRIYsWpduVBJaZC8UcjG2xIguYH\nlTVnn7Ls0+8PzA7rLuzm7Dc555DXa4aZ3b2u61zv/bjZffu9znVOZnR0dDQAACCRqlIHAADg1UXB\nBAAgKQUTAICkFEwAAJJSMAEASErBBAAgKQUTqFhHjhyJCy+8MN785jfHW97ylvj85z9f6kgARETG\n62AClero0aNx9OjRWLVqVfT09ERra2vs2rUrli9fXupoAGc0K5hAxXrd614Xq1atioiIhoaGOOec\nc+KZZ54pcSoAFEzgVeHgwYPx6KOPxtvf/vZSRwE44ymYQMXr6emJK6+8MrZs2RINDQ2ljgNwxlMw\ngYo2NDQUV155ZfzRH/1RbNiwodRxAAg3+QAV7tprr425c+fG7bffXuooAPyKgglUrIceeih+//d/\nP97ylrdEJpOJTCYTn/rUp+LSSy8tdTSAM9qUBXNoaCi+9KUvxfDwcIyMjMS5554bF1xwwYT99uzZ\nEwcOHIhcLhcbN26M5ubmU5UZAIAyNq0VzBdeeCFqampiZGQk7rrrrli3bl0sWrRobHtnZ2c88sgj\n8b73vS+OHDkS3/jGN+K66647pcEBAChP07rJp6amJiJeXM0cGRmJTCYzbvv+/ftj5cqVERGxaNGi\nGBgYiJ6ensRRAQCoBNnp7DQyMhJbt26N559/Ptrb22PhwoXjtnd3d0c+nx/7vLGxMQqFgpcLAQA4\nA02rYFZVVcX1118fx48fj+3bt8ezzz4b8+fPn9YJCo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tvf/na80No67meUqRUK\nhfj2/7oyWs3upBUKhVj87X1mVwSzK16hUIh9+8yuWC/9e2t+xZnWJfLR0dGX3dbS0hKPPfZYREQc\nPnw46urqoqGhYWx7a2trfOhDHxr774orroinn37a8zSL0NPTEx0dHWZXJPMrntkVz+yKZ3bFM7uZ\nMb+Zm3IF85577omDBw9Gf39/3H777bF27doYHh6OiIi2trZYtmxZdHZ2xpYtW6KmpiY2bNgw7vh8\nPq/9AwCcQaYsmFdeeeWUD7J+/fokYQAAqHzeyQcAgKSqb7nllltO5wlHR0ejpqYm3vCGN0Rtbe3p\nPHXFM7uZMb/imV3xzK54Zlc8s5sZ85u5zOgr3cEDAAAnySVyAACSUjABAEhKwQQAICkFEwCApBRM\nAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkF\nEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhK\nwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACS\nUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCA\npBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQA\nICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjCB\nijcyMhKrV6+Od77znaWOAkAomMCrwJYtW+Lcc88tdQwAfkXBBCrakSNHYs+ePfHHf/zHpY4CwK8o\nmEBFu/HGG+Mzn/lMZDKZUkcB4FcUTKBi7d69OxYsWBCrVq2K0dHRGB0dLXUkACIiM+o3MlChPv7x\nj8dXvvKVyGaz0d/fH93d3fGud70rvvzlL5c6GsAZTcEEXhU6Ojris5/9bNx7772ljgJwxnOJHACA\npKZcwRwaGoovfelLMTw8HCMjI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dqaL86Ec/is7Oznj/+99f\n6igV4/nnn49f/vKXcccdd0TEi13lC1/4Qlx33XXj3qmQV3ZaC+bChQvH/odraGiIH//4x9N6IXde\ntGvXrpg3b567x0/SO97xjrEnth88eDAefvhh5XKaGhoa4jWveU38z//8T8ydOzf++7//241l0/Sa\n17wmjhw5EoODg5HNZuOnP/2pp7VMw69fZWhpaYlHH300zj///HjssceipaWlRMnK36/PrrOzMx5+\n+OH4wAc+4NULpvDS2S1YsCBuuummsc8/97nPxYc//OFJn6fJyyvpyxS99a1vjd/7vd87naevWIcO\nHYovfelLMX/+/LFLRBdddFGcffbZJU5WWU4UTC9TNH1Hjx6Ne++9N4aHh6OpqSk2btzoRp9p+vd/\n//f48Y9/HFVVVdHc3BzvfOc7o7q6utSxytZL35p49uzZsXbt2li+fHns2LEjCoVCvOY1r4lNmzb5\nQz+JyWb3wAMPxPDw8Ni8Fi1aFJdddlmJk5afyWZ34sbGiBcL5oc+9CEvU3SSTnvBBADg1c1NPgAA\nJKVgAgCQlIIJAEBSCiYAAEkpmAAAJKVgAgCQlIIJAEBSCiYAAEkpmAAAJKVgAgCQlIIJAEBSCiYA\nAEkpmAAAJKVgAgCQlIIJAEBSCiYAAEkpmAAAJKVgAgCQlIIJAEBSCibAJN7whjfEggULor+/f+xr\nd911V6xdu7aEqQAqg4IJMIlMJhMjIyPxuc99bsLXAXhlCibAy7jpppvis5/9bBQKhQnbHn744Whv\nb4+mpqZ4+9vfHt/73vfGtq1duzY+8YlPxPnnnx/5fD4uvfTSeP7558e2f//734/f/d3fjaampnjr\nW98aHR0dp+X7AThdFEyAl9HW1hYXXHBBfOYznxn39a6urrjsssviIx/5SPziF7+IG2+8MdavXx9d\nXV1j+2zbti3uvvvueO6552JgYCBuu+22iIh45pln4rLLLotPfOIT0dXVFbfddlu8+93vjl/84hen\n9XsDOJUUTIBXcOutt8bf/d3fjSuAu3fvjmXLlsXVV18dVVVV8d73vjeWL18eX//618f2+cAHPhBL\nly6N2trauOqqq+LRRx+NiIivfvWrsX79+rjkkksiIuKiiy6Ktra22LNnz+n9xgBOIQUT4BW8+c1v\njssuuyz++q//OiIiRkdH42c/+1ksWbJk3H5LliyJZ555Zuzz173udWMfz5o1K3p6eiIi4umnn44d\nO3bEWWedFWeddVY0NTXFQw89FD//+c9Pw3cDcHoomABTuOWWW+If/uEf4plnnolMJhMLFy6MgwcP\njtvn0KFDsXDhwikf6zd+4zfi2muvjeeffz6ef/756Orqiu7u7vjYxz52itIDnH4KJsAUli5dGu95\nz3vi85//fERErFu3Ljo7O2P79u0xPDwc//RP/xT/9V//FZdffvmUj3XNNdfE17/+9bj//vtjZGQk\njh8/Hh0dHfGzn/3sVH8bAKeNggkwiV9/OaJPfOIT0dfXF5lMJs4666y477774rbbbou5c+fGbbfd\nFrt3746mpqZJj32pRYsWxa5du+JTn/pUzJs3L5YsWRK33XZbjIyMnNLvB+B0yoyOjo6WOgQAAK8e\nVjABAEhKwQQAICkFEwCApBRMAACSUjABAEhKwQQAICkFEwCApBRMAACSUjABAEjq/wehpyKiG/Ph\nlAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x110b41bd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<ggplot: (285769545)>\n"
     ]
    }
   ],
   "source": [
    "p = ggplot(df, aes(xmin='x - w / 2', xmax='x + w / 2', ymin='y', ymax='y + 1', fill='z')) + \\\n",
    "    geom_rect(color='black') + \\\n",
    "    facet_wrap('w')\n",
    "print(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
